package main

import "fmt"

func main() {

	var arr1 [3]int = [3]int{3, 6, 9}
	fmt.Println(arr1)
	var arr2 = [3]int{1, 3, 4}
	fmt.Println(arr2)

	var arr3 = [...]int{3, 4, 5, 6}
	fmt.Println(arr3)
	var arr4 = [...]int{2: 55, 0: 44, 1: 77, 9: 44}
	fmt.Println(arr4)

	//
	TestArr()
}

//二维数组
func TestArr() {
	var arr[2][5]int16
	fmt.Printf("arr的地址是:%p",&arr)
	fmt.Printf("arr[0]的地址是:%p",&arr)
	fmt.Printf("arr[0][0]的地址是:%p",&arr[0][0])

}
